Skip to content

feat(stream): implement declared event ingress - #288

Closed
schickling wants to merge 4 commits into
schickling/2026-08-20-pipesfrom
schickling/2026-08-20-streams-2
Closed

feat(stream): implement declared event ingress#288
schickling wants to merge 4 commits into
schickling/2026-08-20-pipesfrom
schickling/2026-08-20-streams-2

Conversation

@schickling

@schickling schickling commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the stream subsystem specified by #287 as the second PR in stack #294.

  • admits typed nested stream declarations with command, argv, or external ingress
  • lowers launched streams directly to lifecycle-coupled derived exec companions
  • adds source-preserving st2 stream add/rm authoring
  • adds bounded, idempotent st2 event emit ingress with keyed and keyless supersession
  • publishes ordinary inbox records and reuses existing archive/DING safety
  • resolves the st2 VRS implementation delta

Correctness properties

  • predecessor archive happens before successor publication
  • pending crash replay honors archive receipts and cannot restore an archived inbox copy
  • concurrent replay publishes one canonical record; conflicting identity reuse fails closed
  • strict discovery and retained no-follow capabilities guard recipient, state, inbox, and archive paths
  • subjects reject control/newline frontmatter injection
  • pending state stores a digest; the retained receipt ring is bounded at 128
  • suspend/resume stops and relaunches stream companions with the owning agent
  • list/read JSON exposes stable event identity and optional key

Verification

PASS:

  • hosted nix flake check --print-build-logs on the reviewed head
  • local nix flake check --print-build-logs (all 9 x86_64-linux checks)
  • nix develop -c cargo fmt --all -- --check
  • nix develop -c cargo check --workspace --all-targets
  • event E2E: 13/13
  • Agent Spec discovery: 55/55
  • message CLI: 18/18
  • authoring/direct-adapter, lifecycle, inventory, wire, and invariant proofs
  • git diff --check

Additional diagnostic sweeps:

Canonical evals

Canonical conformance and failure-capable E2E proof are shipped in compoundingtech/evals#79, exact-pinned to this PR head. Merge evals #79 after this stack; immutable release provenance follows publication.

Stack

Stack created with GitHub Stacks CLI

@schickling
schickling force-pushed the schickling/2026-08-20-streams-2 branch from 026d8a7 to 0d06b80 Compare August 20, 2026 09:01
@schickling
schickling marked this pull request as ready for review August 20, 2026 09:03
@schickling
schickling force-pushed the schickling/2026-08-20-streams-2 branch from 0d06b80 to d6c8d61 Compare August 20, 2026 09:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d06b8043f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/message.rs
Comment thread src/event.rs Outdated
Comment thread crates/agent-spec/src/kdl_format.rs
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:15
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:15
@schickling schickling closed this Aug 20, 2026
@schickling schickling reopened this Aug 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 002859de35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/event.rs Outdated
Comment thread crates/agent-spec/src/spec.rs
Comment thread src/event.rs Outdated
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:28
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:28
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:34
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:34
@schickling schickling closed this Aug 20, 2026
@schickling schickling reopened this Aug 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9be176f5ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/event.rs Outdated
Comment thread src/agent_author.rs Outdated
Comment thread src/event.rs Outdated
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:48
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:48
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:52
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:52
@schickling schickling closed this Aug 20, 2026
@schickling schickling reopened this Aug 20, 2026
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:53
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:53
@schickling schickling closed this Aug 20, 2026
@schickling schickling reopened this Aug 20, 2026
@schickling
schickling changed the base branch from schickling/2026-08-20-pipes to main August 20, 2026 09:54
@schickling
schickling changed the base branch from main to schickling/2026-08-20-pipes August 20, 2026 09:54
@schickling
schickling force-pushed the schickling/2026-08-20-streams-2 branch from 927aad0 to 2fa21f1 Compare August 20, 2026 09:55
@schickling

Copy link
Copy Markdown
Contributor Author

Superseded by #298 with the identical reviewed tree at 2fa21f1. GitHub repeatedly marked this direct-descendant stacked PR conflicting and suppressed final-head CI; all nine review threads here are addressed and resolved.

@schickling schickling closed this Aug 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fa21f1221

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/event.rs
if archive.join(&filename).is_file() {
Ok(false)
} else {
message::materialize_message_once(inbox, &filename, &rendered)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Create inbox temporaries without following symlinks

When the retained inbox contains a preseeded symlink named .message.tmp-<pid>-<counter>, this new event path calls materialize_message_once, whose fs::write follows that predictable temporary and overwrites its target before publication. Retaining the inbox directory capability prevents ancestor redirection but does not protect this leaf, so a malformed or synced catalog can make event emit modify a file outside the agent directory; materialize the event with no-follow/create-new semantics relative to the retained inbox capability.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant